import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.jz.manage.ModelManage;
import com.jz.model.Model;
import com.jz.model.Test;


public class TestMain {
	public static void main(String[] args) {
		  String configLocation = "applicationContext*.xml";
		  ApplicationContext ctx = new ClassPathXmlApplicationContext(configLocation);
		  ModelManage modelManage = (ModelManage) ctx.getBean("modelManage");
		  
		  Model model = new Model();
		  model.setNumber(100);
		  model.setKind(100);
		  model.setLabel("100");
		  model.setDescription("100");
		  
		  List<Test> testList = new ArrayList<Test>();
		  Test test = new Test();
		  test.setNumber(1000);
		  test.setContent("ssss");
		  testList.add(test);
		  
		  test = new Test();
		  test.setNumber(1001);
		  test.setContent("ssss");
		  testList.add(test);
		  
		  model.setTestList(testList);
		  
		  modelManage.insertModel(model);
		  
	}
}
